pub type size_t = u64;
#[no_mangle]
pub extern "C" fn strlcpy(mut dst: *mut i8, mut src: *const i8, mut siz: size_t) -> size_t {
    let mut d: *mut i8 = dst;
    let mut s: *const i8 = src;
    let mut n: size_t = siz;
    if n != 0 as u64 && {
        n = n.wrapping_sub(1);
        n != 0 as u64
    } {
        loop {
            let fresh0 = s;
            s = unsafe { s.offset(1) };
            let fresh1 = d;
            d = unsafe { d.offset(1) };
            (unsafe { *fresh1 = *fresh0 });
            if (unsafe { *fresh1 }) as i32 == 0 {
                break;
            }
            n = n.wrapping_sub(1);
            if n == 0 as u64 {
                break;
            }
        }
    }
    if n == 0 as u64 {
        if siz != 0 as u64 {
            (unsafe { *d = '\0' as i32 as i8 });
        }
        loop {
            let fresh2 = s;
            s = unsafe { s.offset(1) };
            if (unsafe { *fresh2 }) == 0 {
                break;
            }
        }
    }
    return ((unsafe { s.offset_from(src) }) as i64 - 1 as i64) as size_t;
}
